import crissyService from "..";
import serverConfig from "../config";

export const toSubmitMessageAPI = (data) => {
    return crissyService({
        data,
        method: "post",
        url: "/message/toSubmit",
        baseURL: serverConfig.messageService,
        headers: {
            "Content-Type": "application/json",
        },
    })
};


export const toSearchAPI = (data) => {
    return crissyService({
        data,
        method: "get",
        url: `/message/toSearch?keyword=${data}`,
        baseURL: serverConfig.messageService,
    })
};

export const toFindByIdAPI = (data) => {
    return crissyService({
        method: "get",
        url: `/message/toFindById?id=${data}`,
        baseURL: serverConfig.messageService,
    })
};

export const toDeleteByIdAPI = (data) => {
    return crissyService({
        method: "get",
        url: `/message/toDeleteById?id=${data}`,
        baseURL: serverConfig.messageService,
    })
};